package roman.algorithm;
import java.util.LinkedList;

public class Graph {
	public static class Edge implements Comparable<Edge>{
		int toNode;
		int fromNode;
		int cost;
		public Edge(int from, int to, int c){
			fromNode = from;
			toNode = to;
			cost = c;
		}
		
		@Override
		public int compareTo(Edge arg0) {
			if(cost>arg0.cost)
				return 1;
			if(cost<arg0.cost)
				return -1;
			return 0;
		}
	}
	
	public static class Node{
		int name;
		LinkedList<Edge> edges;
		public Node(int n){
			name = n;
			edges = new LinkedList<Edge>();
		}
	}
	
	public static class MatrixGraph{
		int[][] graph;
		public MatrixGraph(int size){
			graph =new int[size][size];
		}
	}
}
